home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d21
/
bg.arc
/
BG.ASM
next >
Wrap
Assembly Source File
|
1989-06-13
|
2KB
|
63 lines
; Version 4/18/89
; BG is written by David Page, Fidonet 109/104 (109/20). I hereby contribute
; this code to the public domain. It is guaranteed to do nothing but take up
; a rather small amount of disk space; use at your own risk. On my machine,
; it does a nice job.
; BG is executed with no parameters, and has the sole effect of making
; the current DESQview window the furthest backgound one. If executed without
; DESQview present, it will issue a message and quit.
_text segment
assume cs:_text,ds:_text,ss:_text
org 100h ;this is a com file
start:
jmp begin
msg db 1bh,10h ; signify manager stream
dw strml ; length of stream without prefix
strm db 0c9h ; window stream to make background
msgl equ $-msg ; length of msg
strml equ $-strm ; length of actual stream without prefix
abort_msg db "DESQview not present!",0dh,0ah,"$"
begin:
mov cx,'DE' ; setup to test for DESQview
mov dx,'SQ' ; finish setup for DV test
mov ax,2b01h ; DOS set date function, will be intercepted
; by DV if present, else DOS will return error
; for bad date
int 21h ; call DOS
cmp al,0ffh ; did DOS return error?
je abort ; if so, abort
; actual message to make current window background is sent below
lea si,msg ; address of msg
push cs ; the address is CS, not DS based
push si ; and push the offset address
mov cx,msgl ; put length of message in cx
xor dx,dx ; zero dx
push dx
push cx ; push length of message
mov bx,0501h ; code for current window
mov ah,12h ; code for WRITE message
int 15h ; call DESQview to do it
exit:
mov ah,4ch ; function to quit to DOS
int 21h ; call DOS
; if here, DESQview must not be present, and we should abort with a message
; to that effect.
abort:
lea dx,abort_msg ; address of abort message where DOS wants it
mov ah,09h ; print $-termintated string to screen
int 21h ; call DOS
jmp exit ; and go to exit
_text ends
end start